<?php __e( doctype('xhtml1-trans') );?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

<title><?php __e(OS_CRM_PAGE_TITLE);?></title>

<?php
$meta = array(
        array('name' => 'robots', 'content' => OS_CRM_META_ROBOTS),
        array('name' => 'description', 'content' => OS_CRM_DESCP),
        array('name' => 'keywords', 'content' => OS_CRM_KEYWORDS),
        array('name' => 'robots', 'content' => 'no-cache'),
        array('name' => 'Content-type', 'content' => 'text/html; charset=utf-8', 'type' => 'equiv')
    );
__e( meta($meta) ); 
?>


<?php __e( link_tag( base_url() . 'css/fr/reset.css' ) ); ?>
<?php __e( link_tag( base_url() . 'css/fr/os_main.css' ) ); ?>
<?php __e( link_tag( base_url() . 'css/fr/jquery-ui.css' ) ); ?>
<?php __e( link_tag( base_url() . 'js/facebox/facebox.css' ) ); ?>
<?php __e( link_tag( base_url() . 'js/autosug/style.css' ) ); ?>
<?php __e( link_tag( base_url() . 'images/favicon.ico', 'shortcut icon', 'image/ico' ) ); ?>

<!-- JavaScripts-->
<script language="javascript" type="text/javascript">
var base_url = '<?php echo base_url(); ?>';
var site_url = '<?php echo site_url(); ?>';
var cur_url = '<?php echo current_url(); ?>';
</script>
<script language="javascript" type="text/javascript" src="<?php echo base_url(); ?>js/jquery.min.js"></script>
<script language="javascript" type="text/javascript" src="<?php echo base_url(); ?>js/jquery-ui.min.js"></script>
<script language="javascript" type="text/javascript" src="<?php echo base_url(); ?>js/facebox/facebox.js"></script>
<script language="javascript" type="text/javascript" src="<?php __e( base_url() ); ?>js/main.js"></script>
<script anguage="javascript" type="text/javascript">
function suggest(inputString){
		if(inputString.length == 0 || inputString.length < 3) {
			$('#suggestions').fadeOut();
      $('#srch_bk_title').removeClass('load');
		} else if(inputString.length >= 3){
      $('#srch_bk_title').addClass('load');
      $.post("<?php __e(site_url('journals/ajax/suggen')); ?>", {queryString: ""+inputString+""}, function(data){
          if(data.length >0) {
            $('#suggestions').fadeIn();
            $('#suggestionsList').html(data);
            $('#srch_bk_title').removeClass('load');
          }
        });
		}
	}

	function fill(thisValue) {
    $('#srch_bk_title').removeClass('load');
		/*$('#srch_bk_title').val(thisValue);*/
    var url = '<?php __e(site_url('journals/contents_list'));?>/'+thisValue; 
    setTimeout("$('#suggestions').fadeOut();", 600);
    redirect_page(url);		
	}

</script>

</head>
    
<body>
<noscript>
  <div class="no_javascript">Sorry, Javascript is disabled on your machine. Enable Javascript or Please open the site on a Javascript enabled browser.</div>
</noscript>   
<!--wrapper div -->


    <div class="main_wrapper">
        <!-- head_wrapper -->
        <div class="head_wrapper">
            <div class="logo_hme">
                <?php 
                    $image_properties = array(
                                            'src' => 'images/logo_home.jpg',
                                            'alt' => OS_CRM_TITLE,
                                            'class' => 'logo_hme',
                                            'width' => '260',
                                            'height' => '78',
                                            'title' => OS_CRM_TITLE,
                                            'rel' => 'lightbox',
                                            );

                    __e( '<a href="'.site_url().'" title="Home">'. img($image_properties) .'</a>' );
                ?>
            </div>

            <div class="right_part_hme">
              <form name="frmchncountry" id="frmchncountry" method="post" action="<?php __e(site_url('login/ajax/change_country'));?>">
                <!-- top_right_nav -->
                <div class="top_right_nav">
                    <a href="<?php __e(site_url('contact-us'));?>">Contact Us</a><span>|</span> 
                    <a href="<?php __e(site_url('members'));?>" title="Create an Account">Create an Account</a><span>|</span> 
                    <a href="<?php __e( site_url('login') ); ?>">Customer Login</a><span>|</span>
                    <select name="chng_coutry" id="chng_coutry" onChange="javascript:set_country(this);">                      
                      <?php __e(__set_currency_dropdown());?>
                    </select>
                </div>
                <!-- /top_right_nav -->
                </form>
                <!-- top_right_support -->
                <div class="top_right_support">

                  <div class="shopping_cart"><span class="spn">Shopping Cart<br/><span class="cart_qty" id="cart_qty"><?php __e(__get_cart_qty());?></span> Items</span></div>

                    <?php 
                    $image_properties = array(
                                            'src' => 'images/customer_support_no.jpg',
                                            'alt' => OS_CRM_TITLE . ' Customer Support '.OS_CRM_TEL ,
                                            'class' => 'cust_support_hme',
                                            'width' => '266',
                                            'height' => '70',
                                            'title' => OS_CRM_TITLE . ' Customer Support '.OS_CRM_TEL,
                                            'rel' => 'lightbox',
                                            );

                    __e( img($image_properties) );
                    ?>
                <!-- /top_right_support -->

                </div>
            </div>
            <br class="clearall"/>
            <form action="<?php __e(site_url('journals/search'));?>" method="post" name="frm_srch_panel" id="frm_srch_panel">
            <div class="nav_srch_panel">
                <ul class="srch_box">
                    <li>
                        <label>All fields</label>                            
                        <?php 
                        $properties = array(
                                        'name' => 'srch_all_flds',
                                        'id' => 'srch_all_flds',
                                        'class' => 'txt_srch wid_b',
                                        'maxlength' => 100,
                                        'tabindex' => 1
                                        );
                        __e( textbox($properties) );
                        ?>
                   </li>
                   <li class="liwid">
                       <label class="label_s">Author</label>                            
                        <?php 
                        $properties = array(
                                        'name' => 'srch_author',
                                        'id' => 'srch_author',
                                        'class' => 'txt_srch wid_b',
                                        'maxlength' => 255,
                                        'tabindex' => 2
                                        );
                        __e( textbox($properties) );
                        ?>
                   </li>
                   <li class="suggest">
                        <label>Journal/Book Title</label>                            
                        <?php 
                        $properties = array(
                                        'name' => 'srch_bk_title',
                                        'id' => 'srch_bk_title',
                                        'class' => 'txt_srch wid_b',
                                        'maxlength' => 255,
                                        'tabindex' => 3,
                                        'onkeyup' => "suggest(this.value);",
                                        'onblur' => "fill();",
                                        'autocomplete' => 'off'
                                        );
                        __e( textbox($properties) );
                        ?>
                        
                    <div class="suggestionsBox hideme " id="suggestions" > 
                      <img src="<?php __e(base_url());?>js/autosug/arrow.png" style="position: relative; top: -12px; left: 30px;" alt="upArrow" />
                    <div class="suggestionList" id="suggestionsList"> &nbsp; </div>
                    </div>
                   </li>
                   <li class="srch_box_cust liwid">
                       <ul>
                           <li class="li1">
                            <label>Volume</label>                            
                            <?php 
                            $properties = array(
                                            'name' => 'srch_vol',
                                            'id' => 'srch_vol',
                                            'class' => 'txt_srch wid_s',
                                            'maxlength' => 5,
                                            'tabindex' => 4
                                            );
                            __e( textbox($properties) );
                            ?>
                       </li>
                       <li class="li2">
                            <label>Issue</label>                            
                            <?php 
                            $properties = array(
                                            'name' => 'srch_issue',
                                            'id' => 'srch_issue',
                                            'class' => 'txt_srch wid_s',
                                            'maxlength' => 3,
                                            'tabindex' => 5
                                            );
                            __e( textbox($properties) );
                            ?>
                       </li>
                       <li class="li3">
                            <label>Page</label>                            
                            <?php 
                            $properties = array(
                                            'name' => 'srch_page',
                                            'id' => 'srch_page',
                                            'class' => 'txt_srch wid_s',
                                            'maxlength' => 3,
                                            'tabindex' => 6
                                            );
                            __e( textbox($properties) );
                            ?>
                       </li>
                       </ul>
                   </li>
                </ul>
                <div class="srch_div">
                <?php 
                $properties = array(
                        'name' => 'srch_btn',
                        'id' => 'srch_btn',
                        'class' => 'srch_btn',
                        'value' => '',
                        'tabindex' => 7
                        );
                __e( inputbox($properties) );
                ?>
                </div>
                <div class="login_link">
                  <?php if(__is_loggedin()){ $usr_info = __loggedin_info('usr_info'); ?>
                  Welcome, <a href="<?php __e( site_url('dashboard') ); ?>" title="My Account"><?php __e($usr_info['usr_name']); ?></a>&nbsp;&nbsp;or&nbsp;&nbsp;
                  <a href="<?php __e( site_url('login/logout') ); ?>" title="Logout">Logout</a>
                  <?php }else{ ?>
                    <a href="<?php __e( site_url('login') ); ?>" title="Login">Login</a>&nbsp;&nbsp;or&nbsp;&nbsp;<a href="<?php __e(site_url('members'));?>" title="Register">Register</a>
                  <?php }/*</if(__is_loggedin())>*/ ?>
                  
                  
                </div>
            </div>
              </form>
        <!-- /head_wrapper -->
        </div>   
        
        
            
        <!-- top menu -->
        <div class="top_menu">
            <span class="gap">&nbsp;</span>
            <a href="<?php __e( site_url() ); ?>" title="Home">Home</a>
            <a href="<?php __e( site_url('page/pricelist') ); ?>" title="Pricelist <?php __e(OS_CRM_TITLE);?>">Price List</a>
            <a href="<?php __e( site_url('dashboard') ); ?>" title="My Account">My Account</a>
            <a href="<?php __e( site_url('cart') ); ?>" title="Shopping Cart">Shopping Cart</a>            
            <a href="<?php __e( site_url('page/aboutus') ); ?>" title="About <?php __e(OS_CRM_TITLE);?>">About Us</a>
            <a href="<?php __e( site_url('contact-us') ); ?>" title="Contact <?php __e(OS_CRM_TITLE);?> - <?php __e(OS_CRM_TEL);?>">Contact Us</a>
        </div>
        <!-- /top menu -->
        
        <!-- body_wrap -->
        <div class="body_wrap">
          <div class="left_panel_flt">
            
            <!-- left_nav -->
            <?php
              $cont_str = '';
              $lef_nav = get_left_nav();
              if(!empty ($lef_nav['num_rows'])){
                $cont_str .= '<ul class="left_nav">';                
                foreach ($lef_nav['list'] as $key => $value) {
                  $cont_str .= '<li><a href="'.  site_url('journals/subjects/'.$value['os_category_id']).'" 
                                    title="'.$value['os_category_name'].'">
                                      '.$value['os_category_name'].'
                                    </a>
                                </li>';
                }
                $cont_str .= '</ul>';
              }
              __e($cont_str);
            ?>
            
            
            <ul class="left_nav">
              <?php if(isset($frm_name) && $frm_name == 'frm_contents_list'){ ?>
                                       
              <li>
                <table width="100%" cellpadding="0" cellspacing="0" class="nav_volume">
                  
                  <?php
                  if($nav_volume_num_rows > 0){                    
                    foreach ($nav_volume_data as $key => $tmp_vol_set) { ?>
                      
                      <tr>
                        <td class="volume_sel vol_head">
                          <a href="#"><img src="<?php __e(base_url() . 'images/icons/png/maximize.png' );?>" width="16" height="16" /></a>
                          <a href="#"><?php __display_data($tmp_vol_set['set']);?></a>
                        </td>  
                      </tr>
                      <?php 
                      foreach ($tmp_vol_set['val'] as $key => $tmp_vol) {
                      $jurl = site_url('journals/contents_list/'.$tmp_vol['os_journals_id'].'/'.$tmp_vol['os_volume_id']);
                      ?>
                      <tr>
                        <td class="volume_sel left_pad vol_info">
                          <a href="<?php __e($jurl);?>">Volume <?php __display_data($tmp_vol['os_volume_no']);?>, Issue <?php __display_data($tmp_vol['os_volume_issue_no']);?></a>
                          <p>Year: <?php __display_data($tmp_vol['os_volume_issue_dt_range']);?>, <br/>Page: <?php __display_data($tmp_vol['os_volume_pages']);?></p>
                        </td>
                      </tr>
                      <?php
                      }/*</foreach ($tmp_vol_set['val'] as $key => $tmp_vol)>*/
                    }/*</foreach ($nav_volume_data as $key => $tmp_vol)>*/
                    /*<tr>
                        <td class="volume_sel left_pad vol_info">
                          <a href="#">Volume 1, Issue 2</a>
                          pp. A1-A6, e15-e19, 517-516 (November-December 2011)</td>
                      </tr>*/
                  }/*</if($nav_volume_num_rows > 0)>*/ 
                  ?>
                </table>
              </li>
              <?php }/*</if(isset($frm_name) && $frm_name == 'frm_contents_list')>*/ ?>
            </ul>
          </div>
            
            
            <!-- content_area -->
            <div class="content_area">
              
              <?php $homepage = $this->uri->segment(1); ?>
              <?php if(empty($homepage)){ ?>
                <div class="banner">
                    <a href="#"><?php 
                    $image_properties = array(
                                            'src' => 'images/banner_top_sellers.jpg',                                            
                                            'title' => 'Todays Bestsellers',
                                            'alt' => 'Todays Bestsellers',
                                            'width' => '210',
                                            'height' => '198',
                                            'border' => 0
                                            );

                    __e( img($image_properties) );
                    ?></a>
                    
                    <a href="#"><?php 
                    $image_properties = array(
                                            'src' => 'images/banner_best_sellers.jpg',                                            
                                            'title' => 'Top 25 Best Articles',
                                            'alt' => 'Top 25 Best Articles',
                                            'width' => '601',
                                            'height' => '198',
                                            'border' => 0
                                            );

                    __e( img($image_properties) );
                    ?></a>
                </div>
                <?php }/*</if(empty($homepage))>*/ ?>
                <div class="main_content">